package com.team.appinfo.service.impl;

import com.team.appinfo.entity.AppVersion;
import com.team.appinfo.mapper.AppInfoMapper;
import com.team.appinfo.mapper.AppVersionMapper;
import com.team.appinfo.service.AppInfoService;
import com.team.appinfo.service.AppVersionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class AppVersionServiceImpl implements AppVersionService {
    @Autowired
    private AppVersionMapper appVersionMapper;

//根据用户查询版本号
    public List<AppVersion> getAppVersionById(Long id) {
        return appVersionMapper.getAppVersion(id);
    }

    //新增
    public int insertAppVersion(AppVersion appVersion) {
        return appVersionMapper.insertSelective(appVersion);
    }

    //查询最新版本号
    public AppVersion getLastAppVersion(Long appid) {
        return appVersionMapper.getLastAppVersion(appid);
    }
}
